from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver import ActionChains
from selenium.webdriver import EdgeOptions
import time
option = EdgeOptions()
option.add_argument('--disable-blink-features=AutomationControlled')
bro = webdriver.Edge(options=option)
bro.get('https://www.12306.cn/index/')
action = ActionChains(bro)
log_in = bro.find_element(By.ID, 'J-btn-login')
log_in.click()
account = bro.find_element(By.ID, 'J-userName')
account.send_keys('2523810765@qq.com')
password = bro.find_element(By.ID, 'J-password')
password.send_keys('AAaa1234')
log = bro.find_element(By.ID, 'J-login')
log.click()
time.sleep(1)
div = bro.find_element(By.ID,'nc_1_n1z')
action.click_and_hold(div)
for i in range(5):
    action.move_by_offset(68,0).perform()
action.release().perform()
time.sleep(10)
bro.quit()